package com.yixun.lbx.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author lbx create by 2021/5/20 15:39
 * @apiNote ProDetail
 */

public class ProDetail {
    private String companyName;
    private String enterpriseBrand;
    private String typeOfEnterprise;
    private String legalPerson;
    private String telephone;
    private String productName;
    private String productCategory;
    private String ingredient;
    private String price;
    private String images;
    private List<String> productImages;
    
    public String getCompanyName() {
        return companyName;
    }
    
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    
    public String getEnterpriseBrand() {
        return enterpriseBrand;
    }
    
    public void setEnterpriseBrand(String enterpriseBrand) {
        this.enterpriseBrand = enterpriseBrand;
    }
    
    public String getTypeOfEnterprise() {
        return typeOfEnterprise;
    }
    
    public void setTypeOfEnterprise(String typeOfEnterprise) {
        this.typeOfEnterprise = typeOfEnterprise;
    }
    
    public String getLegalPerson() {
        return legalPerson;
    }
    
    public void setLegalPerson(String legalPerson) {
        this.legalPerson = legalPerson;
    }
    
    public String getTelephone() {
        return telephone;
    }
    
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    
    public String getProductName() {
        return productName;
    }
    
    public void setProductName(String productName) {
        this.productName = productName;
    }
    
    public String getProductCategory() {
        return productCategory;
    }
    
    public void setProductCategory(String productCategory) {
        this.productCategory = productCategory;
    }
    
    public String getIngredient() {
        return ingredient;
    }
    
    public void setIngredient(String ingredient) {
        this.ingredient = ingredient;
    }
    
    public String getPrice() {
        return price;
    }
    
    public void setPrice(String price) {
        this.price = price;
    }
    
    public String getImages() {
        return images;
    }
    
    public void setImages(String images) {
        this.images = images;
    }
    
    public List<String> getProductImages() {
        String[] split = this.images.split(",");
        ArrayList<String> list = new ArrayList<>();
        for (String s : split) {
            list.add(s);
        }
        return list;
    }
    
    public void setProductImages(List<String> productImages) {
        this.productImages = productImages;
    }
    
    @Override
    public String toString() {
        return "ProDetail{" +
                "companyName='" + companyName + '\'' +
                ", enterpriseBrand='" + enterpriseBrand + '\'' +
                ", typeOfEnterprise='" + typeOfEnterprise + '\'' +
                ", legalPerson='" + legalPerson + '\'' +
                ", telephone='" + telephone + '\'' +
                ", productName='" + productName + '\'' +
                ", productCategory='" + productCategory + '\'' +
                ", ingredient='" + ingredient + '\'' +
                ", price='" + price + '\'' +
                ", images='" + images + '\'' +
                ", productImages=" + productImages +
                '}';
    }
}
